package com.lonely.inventory.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.lonely.common.core.domain.Cascader;
import com.lonely.common.core.domain.Select;
import com.lonely.inventory.domain.dto.storagearchive.BatchDeleteStorageArchiveDTO;
import com.lonely.inventory.domain.dto.storagearchive.PrintStorageCodeDTO;
import com.lonely.inventory.domain.dto.storagearchive.StorageArchivePageQueryDto;
import com.lonely.inventory.domain.dto.storagearchive.StorageArchiveSubmitDto;
import com.lonely.inventory.domain.entity.SysInventoryStorageArchive;
import com.lonely.inventory.domain.vo.storagearchive.StorageArchivePageQueryVo;

import java.util.List;

/**
 * @author : 黄志标
 * @date: 2025/9/17 17:07
 * @description: 库位档案服务接口
 */
public interface IStorageArchiveService extends IService<SysInventoryStorageArchive> {


    /**
     * 分页查询
     *
     * @param queryDto
     * @return
     */
    Page<StorageArchivePageQueryVo> page(StorageArchivePageQueryDto queryDto);

    /**
     * 创建库位并打印
     *
     * @param submitDto
     * @return
     */
    String saveAndPrint(List<StorageArchiveSubmitDto> submitDto);

    /**
     * 删除库位
     *
     * @param id
     * @return
     */
    void deleteStorageArchive(Long id);

    /**
     * 打印库位码
     *
     * @param printStorageCodeDTO
     * @return
     */
    String printStorageCode(PrintStorageCodeDTO printStorageCodeDTO);

    /**
     * 批量删除库位档案
     *
     * @param batchDeleteStorageArchiveDTO
     */
    void batchDeleteStorageArchive(BatchDeleteStorageArchiveDTO batchDeleteStorageArchiveDTO);

    /**
     * 获取库位码级联数据
     *
     * @return
     */
    List<Cascader> getStorageCodeCascader();

    /**
     * 根据库位码获取对应的库位档案信息
     *
     * @param storageCode
     * @return
     */
    SysInventoryStorageArchive getByStorageCode(String storageCode);

    /**
     * 获取备货库存类型的库位列表
     *
     * @return
     */
    List<Select> getStorageArchiveSelectByBhStorageType();

}
